package com.gxdf.uc.data;

import java.util.List;

import android.content.Context;
import android.content.pm.LabeledIntent;
import android.util.AttributeSet;
import android.view.ViewGroup;
import android.widget.CheckBox;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.LinearLayout.LayoutParams;

public class GxdfCheckBox extends GxdfField {
	
	CheckBox c;
	TextView lbl;

	public GxdfCheckBox(Context context, String name,Field f) {
		super(context, f);
		
		c = new CheckBox(context);
		c.setLayoutParams(new LayoutParams(ViewGroup.LayoutParams.FILL_PARENT,ViewGroup.LayoutParams.WRAP_CONTENT));
		//c.setChecked(selected);
		lbl = new TextView(context);
		//lbl.setText(this.labelValue);
		
		
	}

	

	@Override
	public void drawField() {
		// TODO Auto-generated method stub
		this.addView(this.lbl);
		this.addView(this.c);
	}

	@Override
	public String getValue() {		
		return (this.c.isChecked()) ? this.c.getText().toString() : "";		
	}



	@Override
	public void saveValues() {
		// TODO Auto-generated method stub
		
	}



	@Override
	public boolean isModified() {
		// TODO Auto-generated method stub
		return false;
	}



	@Override
	public List<String> getActualValues() {
		// TODO Auto-generated method stub
		return null;
	}



	@Override
	protected boolean errorFormat() {
		// TODO Auto-generated method stub
		return false;
	}



	@Override
	protected boolean errorLength() {
		// TODO Auto-generated method stub
		return false;
	}



	@Override
	public boolean isFieldvalid() {
		// TODO Auto-generated method stub
		return false;
	}



	@Override
	public void runValidationRules() {
		// TODO Auto-generated method stub
		
	}

	

}
